import request from "@/utils/request";

// 查询广告列表
export function listAdvertisements(query) {
  return request({
    url: "/advert/advertisements/list",
    method: "get",
    params: query,
  });
}

// 查询广告详细
export function getAdvertisements(id) {
  return request({
    url: "/advert/advertisements/" + id,
    method: "get",
  });
}

// 新增广告
export function addAdvertisements(data) {
  return request({
    url: "/advert/advertisements",
    method: "post",
    data: data,
  });
}

// 修改广告
export function updateAdvertisements(data) {
  return request({
    url: "/advert/advertisements",
    method: "put",
    data: data,
  });
}

// 删除广告
export function delAdvertisements(id) {
  return request({
    url: "/advert/advertisements/" + id,
    method: "delete",
  });
}

// 审核
export function verify(query) {
  return request({
    url: "/advert/advertisements/verify",
    method: "get",
    params: query,
  });
}
